import instance from "@/util/request";

// 教学班分页查询
export function listClass(params){
    return instance({
        url:'/clazz/page',
        method:'get',
        params
    })
}

// 添加教学班
export function addClass(data){
    return instance({
        url:'/clazz/add',
        method:'post',
        data
    })
}

// 修改教学班
export function esitClass(data){
    return instance({
        url:'/clazz/update',
        method:'put',
        data
    })
}


// 教学班删除
export function removeClass(id){
    return instance({
        url:`/clazz/delete/${id}`,
        method:'put',
    })
}

// 教学班关联老师
export function setTeacher(params){
    return instance({
        url:'/clazz/related/teacher',
        method:'put',
        params
    })
}

// 教学班关联活动
export function setActivity(params){
    return instance({
        url:'/clazz/related/activity',
        method:'put',
        params
    })
}


// 教学班添加学生
export function addClazzStudents(data){
    return instance({
        url:'/clazz/student/add',
        method:'post',
        data
    })
}

// 教学班删除学生
export function removeClazzStudent(params){
    return instance({
        url:'/clazz/student/delete',
        method:'delete',
        params
    })
}


// 查询教学班列表
export function optionClass(params){
    return instance({
        url:'/clazz/list',
        method:'get',
        params
    })
}